/**
 * Copyright (c) 2018-2019 PoleStar Studio. All Rights Reserved. <br>
 * Use is subject to license terms.<br>
 * <p>
 * 在此处填写文件说明
 */
package edu.javaee.spring.assemble_annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * bean的装配测试类.
 * <p>说明.<br>
 *     1.基于xml的装配
 * @version v1.0
 * @author lianzuozheng
 * @date 2019-03-21 -18:00 
 */
public class Test {

    public static void main(String[] args) {
        // 指定Spring配置文件路径
        String xmlPath= "edu/javaee/spring/assemble_annotation/beans.xml";
        // 创建Spring容器
        ApplicationContext ac = new ClassPathXmlApplicationContext(xmlPath);
        // 从容器中获取bean
        StudentController student = (StudentController) ac.getBean("studentController");
        // 使用bean
        System.out.println(student.toString());

    }

}
